package DBModel

import (
	"misc/mgo"
	log "misc/seelog"
	"time"
)

var Db *mgo.Database

func Start() {
	sess, err := mgo.DialWithTimeout("localhost:27017", time.Second*3)
	if err != nil {
		log.Info("MongoDB数据库 连接失败")
		return
	}
	log.Info("MongoDB数据库连接成功")
	Db = sess.DB("StarPartyDB")
}
